package com.dldata.devtools30.entity;

import jakarta.persistence.*;

import java.util.Objects;

@Entity
@Table(name = "devt_excel_type")
public class DevtExcelTypeEntity {
    private String id;
    private String name;
    private String sm;
    private Integer xh;

    @Id
    @Column(name = "id", nullable = false, length = 64)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 256)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "sm", nullable = true, length = 256)
    public String getSm() {
        return sm;
    }

    public void setSm(String sm) {
        this.sm = sm;
    }

    @Basic
    @Column(name = "xh", nullable = true)
    public Integer getXh() {
        return xh;
    }

    public void setXh(Integer xh) {
        this.xh = xh;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DevtExcelTypeEntity that = (DevtExcelTypeEntity) o;
        return Objects.equals(id, that.id) && Objects.equals(name, that.name) && Objects.equals(sm, that.sm) && Objects.equals(xh, that.xh);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, sm, xh);
    }
}
